package com.symaster.backups.model;

import com.symaster.backups.enumerate.FileSystemStatus;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author yinmiao
 * @version 2024/2/5
 */
@Entity
@Table(name = "bk_file_system_monitor", indexes = {
        @Index(name = "und_path_name", columnList = "pathName", unique = true)
})
@Getter
@Setter
public class FileSystemMonitorModel extends BaseModel {

    /**
     * 监听目录
     */
    private String pathName;
    /**
     * 是否监听
     */
    private Boolean monitor;
    /**
     * 状态
     * {@link FileSystemStatus}
     */
    private Integer status;
    /**
     * 文件数量
     */
    private Integer fileCount;
    /**
     * 文件夹数量
     */
    private Integer folderCount;
    /**
     * 最后扫描时间
     */
    private Date lastScan;
    /**
     * 最后备份文件
     */
    private String lastBackup;

}
